<?php /* Smarty version Smarty-3.0.6, created on 2015-03-19 15:44:14
         compiled from ".\templates\items.tpl" */ ?>
<?php /*%%SmartyHeaderCode:31397550ae0bee6f0e2-62385764%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '07d08673c69bb91f3bed87722f7aae9b6c6197a7' => 
    array (
      0 => '.\\templates\\items.tpl',
      1 => 1426776152,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '31397550ae0bee6f0e2-62385764',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?> <?php $_template = new Smarty_Internal_Template("selectArea.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?> 
	<script>
	$(document).ready(function() {
		//To display the selected area
	 	 var selectedAreaName = sessionStorage.getItem("selectedAreaName");
	     document.getElementById("popId").text=selectedAreaName;
	   	//To display Login UserName
	     var selectedUserName = sessionStorage.getItem("selectedUserName");
	     document.getElementById("userNm").text=selectedUserName;
	});
	</script>
    <style>
    p{
    font-size:15px; font-family:arial;
    }
    </style>
	<table style="margin-top:30px; margin-bottom:30px; border-collapse:collapse; width: 900px; margin-left:12%;">
			<?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('items')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
?>
				<?php if ($_smarty_tpl->tpl_vars['item']->value['item_category_id']==$_smarty_tpl->getVariable('catvar')->value){?>
				<?php  $_smarty_tpl->tpl_vars['category'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('shop')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['category']->key => $_smarty_tpl->tpl_vars['category']->value){
?>
					<?php if ($_smarty_tpl->tpl_vars['item']->value['item_category_id']==$_smarty_tpl->tpl_vars['category']->value['category_id']){?>
					<tr style="border-bottom:1px solid #ccc;">
						<td height="200px" width="200px">
						<!-- Below code is to retrieve the Blob image from the database -->
						<a href="/Project001/phpFiles/index.php?item=<?php echo $_smarty_tpl->tpl_vars['item']->value['item_id'];?>
&cook1=<?php echo $_smarty_tpl->getVariable('cookieValDisp')->value;?>
">
						<img src="data:image/jpeg;base64,<?php echo base64_encode($_smarty_tpl->tpl_vars['item']->value['item_image']);?>
" style="border: 1px solid #ccc; margin: 10px;" height="150px" width="150px">
						</a>
						</td>
					
						<td height="200px" width="200px" style="margin-left: 20px; float: left;">
						<?php  $_smarty_tpl->tpl_vars['company'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('companyList')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['company']->key => $_smarty_tpl->tpl_vars['company']->value){
?>
						<?php if ($_smarty_tpl->tpl_vars['company']->value['company_id']==$_smarty_tpl->tpl_vars['item']->value['item_company_id']){?>
	        				<span>
	          				  <a style="margin-top:30px; display: block; font-family: arial; font-weight:bold; text-transform: uppercase; color: #999; font-size: 14px;" 
	          				  href="/Project001/phpFiles/index.php?item=<?php echo $_smarty_tpl->tpl_vars['item']->value['item_id'];?>
&cook1=<?php echo $_smarty_tpl->getVariable('cookieValDisp')->value;?>
"><?php echo $_smarty_tpl->tpl_vars['company']->value['company_name'];?>
</a>
	          				</span>		
	          			<?php }?>
						<?php }} ?>
						
							<span>
	           				<a style="display: inline-block; margin-bottom: 5px; font-family: arial; color: #999; font-size: 12px;"
	           				href="/Project001/phpFiles/index.php?item=<?php echo $_smarty_tpl->tpl_vars['item']->value['item_id'];?>
&cook1=<?php echo $_smarty_tpl->getVariable('cookieValDisp')->value;?>
"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_name'];?>
</a>
	           				</span>		
						</td>
					
						<td height="200px" width="200px">
							<p><?php echo $_smarty_tpl->tpl_vars['item']->value['item_description'];?>
</p>
						</td>
					
						<?php if ($_smarty_tpl->getVariable('cookieValDisp')->value=="wholesale"){?>
						<?php  $_smarty_tpl->tpl_vars['wholeVal'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('wholesaleList')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['wholeVal']->key => $_smarty_tpl->tpl_vars['wholeVal']->value){
?>
						<?php if ($_smarty_tpl->tpl_vars['wholeVal']->value['item_id']==$_smarty_tpl->tpl_vars['item']->value['item_id']){?>
							<td height="200px" width="200px">
								<p><?php echo $_smarty_tpl->tpl_vars['wholeVal']->value['wholesale_price'];?>
</p>
							</td>
						<?php }?>
							<td height="200px" width="200px">
								<p><?php echo $_smarty_tpl->tpl_vars['wholeVal']->value['whole_item_quantity'];?>
</p>
							</td>
						<?php }} ?>
						<?php }else{ ?>
						<td height="200px" width="200px">
							<p><?php echo $_smarty_tpl->tpl_vars['item']->value['item_retail_price'];?>
</p>
						</td>
						<?php }?>
						
						<td height="200px" width="200px">
							<form action="/Project001/phpFiles/cart.php">
								<input onmouseover="this.style.backgroundColor='#F0F0F0'" onmouseout="this.style.backgroundColor=''" 
								style="color:grey;" class="button silverbtn" type="submit" name="submit" value="Add to Cart">
							</form>
						</td>
					</tr>
					<?php }?>
				<?php }} ?>
				<?php }?>
			<?php }} ?>
	</table>
 
<?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
